home *** CD-ROM | disk | FTP | other *** search
- Path: news.deltanet.com!fuz
- From: fuz@deltanet.com (Scott Ellsworth)
- Newsgroups: comp.lang.c
- Subject: Conversion between 80 and 64 bit doubles
- Date: 22 Feb 1996 19:24:40 GMT
- Organization: Deltanet Communications, Inc.
- Message-ID: <4gifto$aaa@news2.deltanet.com>
- NNTP-Posting-Host: nfs3.delta.net
-
-
- As part of a project I am working on, I have to convert between
- an 80 bit double written on a PC to a 64 bit unix number. On
- most platforms I have seen, this would not be all that hard,
- since the one time it has come up, the 64 bit platform (Mac PPC) had a
- conversion routine. This time, it will not be as kind, as the client
- wants a more general answer. While I might be able to find a conversion
- routine that will work on his AIX compiler, he has hinted darkly that he
- will be moving to other compilers as well, and could I please write a
- general converter?
-
- This is a fairly simple task in one sense - I know the numebrs in
- question will be in range of 64 bit double, and that they will not be
- NANs, so all I must do is convert the valid parts.
-
- Does anyone have a source for such a conversion routine, given that the
- platform in question does not have an 80 bit type? The bit flipping for
- PC-Unix is not a problem - that works already.
-
- (BTW, a URL for the official specs for 64 and 80 bit numbers would be
- greatly appreciated. I have tried to find IEEE 754, but I have not
- succeeded yet, which likely means that I am just searching for it in
- entirely the wrong way.)
-
- Scott
- --
- Scott Ellsworth fuz@deltanet.com
- "When a great many people are unable to find work, unemployment
- results" - Calvin Coolidge, (Stanley Walker, City Editor, p. 131 (1934))
- "The barbarian is thwarted at the moat." - Scott Adams
-